package test.core.safe;

import hyl.core.AIni;
import hyl.core.MyFun;
import hyl.core.safe.MyAes;
import hyl.core.safe.MyBase64;
import hyl.core.safe.MyDes;

public class testAes {
	public static void main(String[] args) {
		test1();
	//	test2();
	}
	public static void test1() {
		String mm=MyFun.join(1,",","垃圾垃圾 ;jp;opoi");
		String str="IhVhV9u_-91VkzLVpgyYoA==";
		String key= AIni.PKEY+"001";
		//String key= "hyl/zdy/37798955"+"001";
		
		
		String s = MyAes.f加密64(mm,key);
		System.out.println(s);
		String s2 = MyAes.f解密64(s, key);
		System.out.println(s2);		
		byte jm2[] = MyAes.f加密(mm.getBytes(),key);
		System.out.println(MyBase64.encodeUri(jm2));		
		byte[] mm2=MyAes.f解密(jm2, key);
		System.out.println(new String(mm2));		
	}
	public static void test2() {
		String mm=MyFun.join(1,",","100000");
		String str="-QqFwDNs7Ebl2KJKKwBFjg==";
	
		String s = MyDes.f加密64(mm);
		System.out.println(s);
		String s2 = MyDes.f解密64(s);
		System.out.println(s2);
	}
}
